
package GJAM.SAMPLE.Calculator;

import GJAM.MVC.*;
import javax.microedition.lcdui.*;

public class SplashScreenView extends View {
    
    public SplashScreenView(Model model, Display display) {
        super(model, display, "");
        
        this.append(getSplashImage());
        this.append(getTitleStringItem());
    }

    private ImageItem getSplashImage() {
        Image image = null;
        try {
            image = Image.createImage("/GJAM/SAMPLE/Calculator/Resources/Calculator.png");
        } catch (Exception e) {
        }
        
        ImageItem imageItem = new ImageItem(null,
                                            image, 
                                            ImageItem.LAYOUT_CENTER | 
                                            ImageItem.LAYOUT_VCENTER |
                                            ImageItem.LAYOUT_NEWLINE_AFTER |
                                            ImageItem.LAYOUT_NEWLINE_BEFORE,
                                            "");
        
        return imageItem;
    }
    
    private StringItem getTitleStringItem(){
        StringItem stringItem = new StringItem("", "Calculator 1.0");
        return stringItem;
    }
    
    public void update() {
        
    }
    
}
